package com.njxzc.igo.controller.order;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import com.njxzc.igo.model.User;
import com.njxzc.igo.service.UserService;
import com.njxzc.igo.service.UserServiceImpl;


@WebServlet(name="MyOrders",urlPatterns="/myorders.do")
public class LoadMyOrdersController extends HttpServlet{
	private UserService  us  = new UserServiceImpl();
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		HttpSession session  = request.getSession();
		User u = (User) session.getAttribute("u");
		u = us.loadAllUserAbout(u);
		request.getRequestDispatcher("WEB-INF/order.jsp").forward(request, response);
	}
}
